home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sources.misc
- From: ramsdell@mitre.org (John D. Ramsdell)
- Subject: v24i021: dvorak - MS-DOS TSR for Dvorak keyboard, Part01/01
- Message-ID: <1991Oct26.215741.4863@sparky.imd.sterling.com>
- X-Md4-Signature: 3e0fd4c84ec502d5c224ef91db868a9c
- Date: Sat, 26 Oct 1991 21:57:41 GMT
- Approved: kent@sparky.imd.sterling.com
-
- Submitted-by: ramsdell@mitre.org (John D. Ramsdell)
- Posting-number: Volume 24, Issue 21
- Archive-name: dvorak/part01
- Environment: MS-DOS
-
- Dvorak keyboard users of PC-AT's may be interested in this program.
- Enjoy, John
- ---------------
- #! /bin/sh
- # This is a shell archive. Remove anything before this line, then feed it
- # into a shell via "sh file" or similar. To overwrite existing files,
- # type "sh file -c".
- # The tool that generated this appeared in the comp.sources.unix newsgroup;
- # send mail to comp-sources-unix@uunet.uu.net if you want that tool.
- # Contents: dvorakat.asm
- # Wrapped by kent@sparky on Sat Oct 26 16:57:19 1991
- PATH=/bin:/usr/bin:/usr/ucb ; export PATH
- echo If this archive is complete, you will see the following message:
- echo ' "shar: End of archive."'
- if test -f 'dvorakat.asm' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'dvorakat.asm'\"
- else
- echo shar: Extracting \"'dvorakat.asm'\" \(3202 characters\)
- sed "s/^X//" >'dvorakat.asm' <<'END_OF_FILE'
- X; Dvorak Keyboard Layout for IBM PC-AT's and clones.
- X
- X page 62,132
- X
- X; This is a terminate-and-stay-resident application that
- X; translates scan codes so as to implement a Dvorak keyboard
- X; on IBM PC-AT's. John D. Ramsdell - October 1991.
- X
- X; Copyright 1991 by The MITRE Corporation.
- X; Permission to use, copy, modify, and distribute this
- X; software and its documentation for any purpose and without
- X; fee is hereby granted, provided that the above copyright
- X; notice appear in all copies. The MITRE Corporation
- X; makes no representations about the suitability of this
- X; software for any purpose. It is provided "as is" without
- X; express or implied warranty.
- X
- X; PC-AT Layout
- X; ! @ # $ % ^ & * ( ) { + Layout differs from the
- X; 1 2 3 4 5 6 7 8 9 0 [ = ANSI standard because
- X; " < > P Y F G C R L ? } the following substitution
- X; ' , . p y f g c r l / ] was made:
- X; A O E U I D H T N S _
- X; a o e u i d h t n s - [ => {
- X; : Q J K X B M W V Z ] => [
- X; ; q j k x b m w v z
- X
- Xresident segment byte public 'res_code'
- X assume cs:resident
- X
- Xtable label byte ; Scan code translation table
- X db 00,01,02,03,04,05,06,07,08,09 ; 00
- X db 10,11,26,13,14,15,40,51,52,25 ; 10
- X db 21,33,34,46,19,38,53,27,28,29 ; 20
- X db 30,24,18,22,23,32,35,20,49,31 ; 30
- X db 12,41,42,43,39,16,36,37,45,48 ; 40
- X db 50,17,47,44 ; 50
- Xold_interrupt label dword
- X dd ? ; Old interrupt and end of table
- X
- Xtranslate_irpt proc far ; Is this the service
- X cmp ah,4fh ; we want to intercept?
- X jne done ; No - so leave.
- X mov ah,al
- X and al,7fh ; Kill make/break bit
- X cmp al,old_interrupt-table
- X jnb mapped ; Not in table.
- X push bx
- X mov bx,offset table
- X xlat cs:table ; translate
- X pop bx
- Xmapped: test ah,80h ; Break code?
- X jz mk_arg ; No.
- X or al,80h ; Yes - flip bit.
- Xmk_arg: mov ah,4fh
- Xdone: jmp cs:old_interrupt; Do old interrupt.
- Xtranslate_irpt endp
- Xresident ends
- X
- Xtransient segment para public 'trans_code'
- X assume cs:transient,ss:stack
- Xbooster proc far
- X mov ax,seg resident
- X mov ds,ax
- X assume ds:resident
- X push es
- X mov es,es:[2ch] ; ES = segment of environment
- X mov ah,49h ; Free memory block
- X int 21h
- X mov ax,3515h ; Get current interrupt
- X int 21h
- X mov word ptr old_interrupt,bx
- X mov word ptr old_interrupt+2,es
- X mov dx,offset translate_irpt
- X mov ax,2515h ; Set interrupt
- X int 21h
- X mov dx,cs ; DX = Start of transient segment
- X pop ax ; AX = PSP segment
- X sub dx,ax ; DX = size of resident portion
- X mov ax,3100h ; Return code is 00h
- X int 21h ; Terminate and stay resident
- Xbooster endp
- Xtransient ends
- X
- Xstack segment word stack 'trans_stack'
- X db 80h dup(?)
- Xstack ends
- X
- Xend booster
- X
- Xexit 0 # Just in case...
- END_OF_FILE
- if test 3202 -ne `wc -c <'dvorakat.asm'`; then
- echo shar: \"'dvorakat.asm'\" unpacked with wrong size!
- fi
- # end of 'dvorakat.asm'
- fi
- echo shar: End of archive.
- exit 0
- --
- Kent Landfield INTERNET: kent@sparky.IMD.Sterling.COM
- Sterling Software, IMD UUCP: uunet!sparky!kent
- Phone: (402) 291-8300 FAX: (402) 291-4362
- Please send comp.sources.misc-related mail to kent@uunet.uu.net.
-